package plgbase

import (
	"dgo/goutils/utils"
)

func init() {
	appname = utils.GetExecuteFileName()
	approot = utils.GetExecuteFileDirectory()

	utils.RegisterFactoryVar("approot", approot)
	utils.RegisterFactoryVar("cwd", approot)
	utils.RegisterFactoryVar("appname", appname)
	utils.RegisterFactoryVar("buildtime", BUILD_TIME)

	PlgWarning = utils.NewSyncCycleList()
	PlgWarning.ConfigMaxSize(1024)

	utils.RegisterCreate("plg.hello", CreateHelloPlgFunc)

	utils.RegisterCreate("plg.fileloader", CreatePlgFileLoaderFunc)

	utils.RegisterCreate("plg.request.impl.ex", CreateRequestImplExPlgFunc)
	utils.RegisterCreate("plg.request.from.ex", CreateRequestFromExPlgFunc)
}
